import { _decorator, Component, Node } from 'cc';
import { BaseComponent } from '../../Manager/UIManager/BaseComponent';
import { TouchPallet } from './TouchPallet';
const { ccclass, property } = _decorator;

@ccclass('ChuansongLoad')
/**
 * 传送层
 */
export class ChuansongLoad extends BaseComponent {

    protected Init(): void {

    }

    protected OnShow(): void {
        for (let i = 0; i < this.node.children.length; i++) {
            let food_num: number = 1 + Math.floor(Math.random() * 2);
            for (let j = 0; j < food_num; j++) {
                let food_index: number = Math.floor(Math.random() * 2);
                this.node.children[i].getComponent(TouchPallet).AddFoode(food_index);
            }
            console.log(i)
        }
    }

}


